﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataExtractionLanguage
{
    [Serializable]
    public class PropertyMember
    {
        public TokenTypeEnum Property { get; set; }
        public string PropertyParameter1 { get; set; }
        public Function Function { get; set; }

        public override string ToString()
        {
            string retVal = string.Empty;

            if (string.IsNullOrEmpty(PropertyParameter1))
                retVal= Property.ToString();
            else
                retVal = string.Format("{0}({1})", Property, PropertyParameter1);

            if (Function != null)
                retVal += Function.ToString();

            return retVal;
        }
    }
}
